<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" 
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
      xmlns:f="http://java.sun.com/jsf/core"      
      xmlns:h="http://java.sun.com/jsf/html">
      <f:view locale="#{localeManager.locale}"/>
 
    <h:head>
   <!--  <h:outputScript library="default" name="js/hello.js" />
    <h:outputStylesheet library="default" name="css/style.css" /> 
    <f:loadBundle basename="com.iddy.messages" var="msg"/>-->
        <title>JSF 2.0 Hello World</title>
    </h:head>
    
    <h:body>
    <h:panelGrid columns="2">
 
		Language : 
	<h:form>
		<h:selectOneMenu value="#{localeManager.language}" onchange="submit()" valueChangeListener="#{localeManager.countryLocaleCodeChanged}">
   			<f:selectItems value="#{localeManager.countriesInMap}" /> 
   		</h:selectOneMenu>
    </h:form>
	</h:panelGrid>
	
	
    	  
    	<h3>JSF 2.0 Hello World Example - hello.xhtml #{helloBean.greeting} <h:graphicImage library="default" name="images/tanzania.png" /></h3>
    	<h:form id="form1">
    	   <h:inputText id="name" value="#{helloBean.name}"></h:inputText>
    	   <h:commandButton value="Welcome Me">
    		 <f:ajax execute="name" render="output" />
    	   </h:commandButton>
 
    	   <h2><h:outputText id="output" value="#{helloBean.sayWelcome}" /></h2>	
    	</h:form>
    	
    	 <h2>JSF 2.0 and Resource Bundles Examples</h2>
      <ol>
 
   	<li><h:outputText value="#{msg.message}" /></li>
 
    	<li><h:outputText value="#{msg['message.test1']}" /></li>
 
    	<li><h:outputText value="#{msg['message.test2']}" /></li>
    	<li><h:outputText value="#{msg['message.test2']}" /></li>
 
    	<li><h:outputText value="#{msg['message.test3']}" /></li>
    	<li><h:outputText value="#{msg['message.test3']}" /></li>
 
    	<li>
 	     <h:outputFormat value="#{msg['message.param1']}">
		<f:param value="param0" />
	     </h:outputFormat>
	</li>
	 <li>
	     <h:outputFormat value="#{msg['message.param2']}">
	    	<f:param value="param0" />
	    	<f:param value="param1" />
	     </h:outputFormat>
	  </li>
    	</ol>
    	
    </h:body>
    
    
</html>